<template>
  <div>
    <el-button type="primary" @click="handleOpen()">查看监控视频</el-button>
    <video-monitor
      ref="videoMonitor"
    />
  </div>
</template>

<script>

import VideoMonitor from '@/components/VideoMonitor/index.vue'

export default {
  components: {
    VideoMonitor
  },
  data() {
    return {
      // 测试用门店编码A6167
      storeNo: 'C664',
      startTime: '2025-09-04 08:40:00',
      endTime: '2025-09-04 08:42:00'
    }
  },
  methods: {
    handleOpen() {
      this.$nextTick(() => {
        this.$refs.videoMonitor.storeNo = this.storeNo
        this.$refs.videoMonitor.searchForm.startTime = this.startTime
        this.$refs.videoMonitor.searchForm.endTime = this.endTime
        this.$refs.videoMonitor.open()
      })
    }
  }
}
</script>
